<template>
  <!-- <view style="margin-top: 10rpx;border: 1px solid red" class="items-btn" v-if="datas.id != -1 && datas.id != 1">
    <view style="font-size: 24rpx;color: red">openid: {{datas.openid}}</view>
    <view>name: {{datas.name}}</view>
    <view>levelname: {{datas.levelname}}</view>
    <view>id: {{datas.id}}</view>
    <view v-if="datas.children" style="display: flex;margin: 10rpx;flex: 1">
      <text>上一级openid：{{ datas.openid }} 名称：{{ datas.name }}</text>
      <DiGui v-for="(item, index) in datas.children" :datas="item" :key="index" />
    </view>
  </view> -->

  <view>
    <!-- <scroll-view scroll-x style="width: 90%;background-color: skyblue;white-space: nowrap;"> -->
      <view class="content u-f-ajc u-f-column t-a-c" v-if="datas.id != -1 && datas.id != 1" style="margin-left: 100rpx;">
        <view class="bhid padd" style="background-color: #EEC2A9;">编号：{{datas.id}}</view>
        <view style="background-color: #F4F4F4;">
          <view class="padd">姓名：{{datas.realname}}</view>
          <view class="padd">级别：{{datas.levelname}}</view>
        </view>
        <view style="background-color: #EEC5CB;width: 100%;">
          <view class="u-f-ajc padd">累积业绩</view>
          <view class="u-f yeji">
            <block v-for="(item2, index2) in datas.children" :key="index2">
              <view class="yeji_item" v-if="item2.id != -1 && item2.id != 1">
                <view>{{item2.realname}}：</view>
                <view>￥---</view>
              </view>
            </block>
          </view>
        </view>
      </view>
    <!-- </scroll-view> -->
    <DiGui v-for="(item, index) in datas.children" :datas="item" :key="index" />
  </view>



</template>

<script>
  import DiGui from "./DiGui.vue"
  export default {
    name: "DiGui",
    components: {
      DiGui
    },
    props: {
      datas: {
        type: Object,
        default: {}
      }
    },
    data() {
      return {

      }
    }
  }
</script>

<style lang="scss">
  .uni-padding-wrap {
    width: 100%;
    box-sizing: border-box;
  }

  .uni-common-mt {
    margin: 60rpx 0;
  }

  .content {
    width: 100%;
    border: 1px solid #333;
    display: inline-block;

    >view {
      width: 100%;
    }

  }

  .activeClass {
    margin: 0 20rpx;
  }

  .register {
    border: 1px solid #333;
    width: 30%;
    margin: 50rpx auto 0;
  }

  .yeji {
    width: 100%;
    font-size: 20rpx;
    flex-wrap: wrap;

    .yeji_item {
      width: 50%;
      // text-align: left;
      margin-bottom: 20rpx;
      // >view {
      //   margin-left: 60rpx;
      // }
    }
  }


  .padd {
    padding: 14rpx 0;
  }
</style>
